$(document).ready(function(){
    $('#content').hide();

});
function ruku(){


    /*alert( $('#shopId').val());*/



    $('#myModal').modal('show');
    $('#myModalLabel').html($('#ruku').text());
}
function  rukusubmit(){
    var id = $('#idBox').text();
    if(id==null||id==undefined||id==""){
         alert("id不能为空");
        return;
    }
    var inventorySourceValue =$('#inventorySourceValue').val();
    if(inventorySourceValue==null||inventorySourceValue==undefined||inventorySourceValue==""){
        alert("来源不能为空");
          return;
    }
    var changeNum = $('#num').val();

      if(changeNum==undefined||changeNum==null||changeNum==""){
         alert("增加库存的数量不能为空");
          return;
      }
    var memo = $('#memo').val();
    if(memo==null||memo==""||memo==undefined){
     alert("备注不能不填写");
       return;
    }
    $.ajax({
        url: '/crm/inventoryC/goodsBePutInStorage.json',

        data: {
            token: localStorage.getItem('crmtoken'),
            id:id,
            inventorySourceValue:inventorySourceValue,
            remark:memo,
            changeNum:changeNum
        },
        type: 'post',
        success: function (data) {

            if (data.code == -1) {
                window.parent.location.href = "/crm/login.jsp"
            }
            if (data.code == 0) {
                alert(data.msg);
            }
            if (data.code == 1) {
                $('#myModal').modal('hide');

                getLogList();
                alert("添加成功");
                window.location.href="/crm/inventoryC/detailsView?id="+id ;
            }
        }
        });


}

